<template>
  <div class="qunliuyan">
    <div class="liuyantit">
      <p class="lyo">群友评论({{ comments.length }})</p>
      <div class="more">
        <a><p class="chakan">查看更多</p></a>
       <img src="@/assets/group/arrow.jpg" alt="arrow">
      </div>
    </div>
    <div class="liuyanz" v-for="(item, idx) in comments" :key="idx">
      <div class="qleft"><img :src="item.img" alt="头像"></div>
      <div class="qcenter">
        <p class="nichen">{{ item.name }}</p>
        <p class="content">{{ item.content }}</p>
      </div>
      <div class="qright">
<!--        <img src="../addons/y2_jiukuaijiu/template/mobile/images/icon3.png" alt="icon3">-->
        <p>{{ item.likes }}</p>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'GroupComments',
  props: {
    comments: {
      type: Array,
      required: true
    }
  }
}
</script>

<style scoped>
.qunliuyan {
  background-color: #fff;
  //width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  padding-bottom: 1rem;
}
.liuyantit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
}
.lyo {
  font-size: 1.25rem;
  color: #5f5f5f;
}
.more {
  display: flex;
  align-items: center;
  font-size: 1rem;
}
.more a {
  color: #576b94;
  text-decoration: none;
}
.more img {
  width: 0.5rem;
  height: 0.75rem;
  margin-left: 0.1rem;
}
.liuyanz {
  display: flex;
  margin-top: 1rem;
}
.qleft {
  border-radius: 0.2rem;
  width: 11%;
}
.qleft img {
  width: 2.6rem;
  height: 2.46rem;
  margin: 0;
  padding: 0;
}
.qcenter {
  display: flex;
  flex-direction: column;
  margin-left: 0.64rem;
  width: 70%;
}
.nichen {
  font-size: 1.07rem;
  color: #a7a7a7;
  margin-top: -0.3rem;
}
.content {
  font-size: 1.21rem;
  line-height: 1.63rem;
  color: #3c3c3c;
  margin-top: -0.5rem;
}
.qright {
  display: flex;
  width: 5%;
}
.qright img {
  width: 1.1rem;
  height: 1.1rem;
}
.qright p {
  font-size: 0.85rem;
  color: #526593;
  margin-left: 0.53rem;
  margin-top: -0.2rem;
}
</style>
